<?php
namespace app\home\controller;
use think\Db;
use think\captcha\Captcha;
use think\Loader;
class Upgrade2business extends \think\Controller{
    public function upgrade2business(){
        
        return $this->fetch('upgrade2business');//继承基类的控制器 
    }
    public function index(){
        $id=session('id');
        $contacts=input('param.contacts','','htmlspecialchars');
        $contactsTell=input('param.contactsTell','','htmlspecialchars');
        $contactsqq=input('param.contactsqq','','htmlspecialchars');
        $contactsEmail=input('param.contactsEmail','','htmlspecialchars');
        $data=['contacts'=>$contacts,'contactsTell'=>$contactsTell,'contactsqq'=>$contactsqq,'contactsEmail'=>$contactsEmail, 'user_id'=>$id,'val'=>0,];
        $res=Db::name('checkuser')->insertGetId($data);
        if($res>0){
            $this->success('申请成功!','home/reg/reg');
            // session('id',$res['id']);
        }else {
            $this->error('申请失败!'); 
        }    
        
    } 
    
}